<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>宽度使用百分比</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<style type="text/css">
			.container{
				width: 100%;
			}
			.container div:nth-of-type(1){
				width: 40%;
				float: left;
				background: #87CEFA;
			}
			.container div:nth-of-type(2){
				width: 60%;
				float: left;
				background: #F08080;
			}
		</style>
	</head>
	<body>
		<div class="container">
			<div>
				box1
			</div>
			
			<div>
				box2
			</div>
		</div>
	</body>
</html>
